home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4552 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  54 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. X-Newsreader: UMSZCo V1.1 BETA 12 (23.2.96)
  3. Mime-version: 1.0
  4. Content-Type: text/plain; charset=iso-8859-1
  5. Content-Transfer-encoding: 8BIT
  6. Path: news.tng.oche.de!tomate.tng.oche.de
  7. X-Gateway: ZCONNECT UE utomate.tng.oche.de.tomate.tng.oche.de [PolyNet zTOr V4.901 Serie: "light"]
  8. Subject: simple K&R ANSI-C examples won't compile under SAS/C
  9. Date: Fri,  1 Mar 96 23:27:15 GMT
  10. Message-ID: <68771782@0humpty.tomate.tng.oche.de>
  11. From: humpty@TOMATE.TNG.OCHE.DE (Andreas Mixich)
  12.  
  13.  
  14.     Hi,
  15.  
  16. this little example form the 'Kernighan&Ritchie' won't compile:
  17.  
  18. #include <stdio.h>
  19. #include <clib/alib_stdio_protos.h>
  20.  
  21. main()
  22. {
  23.     int c;
  24.  
  25.      while((c = GetChar()) !=EOF)
  26.     PutChar(c);
  27. }
  28.  
  29. Yes, *you* laugh now, but for me this is really strange.
  30.  
  31. I get an error #72 in alib_stdio_protos.h; conflict with previous declaration,
  32. see file stdio.h.
  33.  
  34. Now, I have read the guide on this error, but if I leave out the
  35. alib_stdio_protos.h, this will cause the error, no Prototype for function
  36. getchar() (or so).
  37.  
  38. Also, if I do a c = GetChar(void) (as synopsis description in sclib.guide
  39. shows) the error still ocuures.
  40.  
  41. If someone could point me to the page in the SAS manual where I can find
  42. an, explanation (I have read the errors and warnings section, but it is
  43. very similare to the guide's text) or could tell me what I am doing wrong.
  44. I can't continue my C-course as long I have no solution for this.
  45.  
  46. -- 
  47. Ciao, Andreas
  48. Internet: humpty@tomate.tng.oche.de
  49. FIDO    : 2:244/1544.14
  50.  
  51. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=++=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  52. No program done by an undergrad will work after she graduates.
  53.  
  54.